TQ3ElementCopyReplaceMethod
You can define a method to copy the data of your custom element type when an element of that type is being replaced by another element of that type.
typedef TQ3Status (*TQ3ElementCopyReplaceMethod) ( const void *fromAPIElement, void *ontoInternalElement);
fromAPIElement
- A pointer to the element data associated with an element having your custom element type.
ontoInternalElement
- On entry, a pointer to an empty, zeroed block of memory large enough to contain the element data associated with an element having your custom element type.
DESCRIPTION
YourTQ3ElementCopyReplaceMethod
function should copy the element data pointed to by thefromAPIElement
parameter into the location pointed to by thetoInternalElement
parameter. This method is called whenever theQ3Set_Add
orQ3AttributeSet_Add
function is used to replace an element of your custom type in a set. ThefromAPIElement
parameter contains the same data pointer that was passed toQ3Set_Add
orQ3AttributeSet_Add
. TheontoInternalElement
parameter is a pre-existing block initialized by yourTQ3ElementCopyAddMethod
orTQ3ElementCopyDuplicateMethod
method.RESULT CODES
YourTQ3ElementCopyReplaceMethod
function should returnkQ3Success
if it is successful andkQ3Failure
otherwise.